BUILDING MEGAZEUX ON OS X

If you are building on the Darwin 10 platform (OS 10.6 or higher) you can build
MegaZeux without using Xcode by following the instructions in this file. The
resulting package will be a universal binary containing ppc and i686 code.

PREREQUISITES

You must build static library versions of SDL, libpng, Ogg & Vorbis and
have them installed to a common prefix. The following command lines to
`configure' are recommended:

i686:

CC="i686-apple-darwin10-gcc-4.2.1" CFLAGS="-O2 -mmacosx-version-min=10.4" \
LDFLAGS="" ./configure --prefix=$HOME/workspace/build-i686 \
                       --disable-shared --enable-static \
                       --target=i686-apple-darwin10 \
                       --host=i686-apple-darwin10

powerpc:

CC="powerpc-apple-darwin10-gcc-4.2.1" CFLAGS="-O2 -mmacosx-version-min=10.4" \
LDFLAGS="" ./configure --prefix=$HOME/workspace/build-powerpc \
                       --disable-shared --enable-static \
                       --target=powerpc-apple-darwin10 \
                       --host=powerpc-apple-darwin10

Similar command lines can be used for AMD64 and PPC64, but these are not
typically built.

CONFIGURATION

The only tested config.sh line used to build for OS X is:

./config.sh --platform darwin --prefix blah \
            --disable-utils --disable-x11 --enable-release

(X11 support is disabled because it is incompatible with the Framework SDL
 package. If this bug is corrected, it can be re-enabled.)

BUILDING (i686)

You need Xcode's development tools package to have been installed. This does
NOT mean you need all of the Xcode IDE, but you do need the DMG file it is
installed from. This is normally included on your OS X install DVD #1. It is
enough to install the UNIX tools.

make ARCH=i686 package
make distclean

Will build the i686 binary, and put it in the root as "mzxgit.i686". It will
also clean the source tree, which is VERY IMPORTANT.

BUILDING (ppc)

This step is optional, but if you want to support G4 Macs running 10.4, you
need to do this.

make ARCH=ppc package
make distclean

Will build the ppc binary, and put it in the root as "mzxgit.ppc". It will
also clean the source tree, which is VERY IMPORTANT.

BUILDING AMD64/PPC64

The instructions above can also be repeated with ARCH=amd64 and ARCH=ppc64 for
64bit binaries (this may improve performance, but it is not necessary).

PACKAGING (+ UNIVERSAL BINARIES)

Simply run:

make lipo
make archive

This will output a file to the "build/dist/darwin" directory at the top level.
One of these is an installable universal Disk iMaGe.

--ajs (20091225)
